var o = require("./utils/Network.js");

App({
    data: {
        mainURL: "https://zy.mdqrmyy.com",
        authorization: ""
    },
    onLaunch: function() {
        var t = this;
        // wx.login({
        //     complete: function(a) {
        //         console.log(a), a.code ? o.requestNoHeader("/api/patient/wxlogin", {
        //             code: a.code
        //         }, "POST").then(function(o) {
        //             t.data.authorization = o.data.obj.Authorization, wx.setStorageSync("authorization", o.data.obj.Authorization), 
        //             t.getAuthorizationCallback && t.getAuthorizationCallback(o);
        //         }).catch(function(o) {
        //             console.log("请求失败！" + o), wx.showLoading({
        //                 title: "服务器正在升级"
        //             });
        //         }) : console.log("登录失败！" + a.errMsg);
        //     }
        // });
        
    },
    globalData: {
        userInfo: null
    }
});